
#ifndef Velyn_Point3_h
#define Velyn_Point3_h

namespace Velyn {

    namespace Object {
        
        /*
         * Specifies a point3 for a vertex.
         *
         * @author n7down
         */
        class Point3 {
            
        public:
            
            union {
                float _v[3];
                struct {
                    float x, y, z;
                };
                struct {
                    float r, g, b;
                };
            };
            
            void set(const float x, const float y, const float z) {
                _v[0] = x; _v[1] = y; _v[2] = z;
            }
            
            void set(const Point3 p) {
                _v[0] = p._v[0]; _v[1] = p._v[1]; _v[2] = p._v[2];
            }
            
            const float* get() const {
                return _v;
            }
            
            void print() {
                std::cout << "[ " << _v[0] << " " << _v[1] << " " << _v[2] << " ]\n";
            }
        };
    }
}

#endif
